<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>CSS选择器新特性</title>
    <style>

        input[value=请输入1]{
            background-color: red;
        }
        /*对于没有多种元素的*/
        ul li:first-child{
            background-color: indianred;
        }

        ul li:last-child{
            background-color: gold;
        }

        ul li:nth-child(2n+1){
            background-color: blue;
        }

        .third div:nth-of-type(1){
            background-color: green;
        }

        .forth div::before{
            content: "我";
        }

        .forth div::after{
            content: "猪八戒";
        }

    </style>
</head>
<body>

<div class="first">
    <input value="请输入1">
    <input value="请输入2">
</div>

<div class="second">
    <ul>
        <li>1</li>
        <li>2</li>
        <li>3</li>
        <li>4</li>
        <li>5</li>
        <li>6</li>
        <li>7</li>
        <li>8</li>
    </ul>
</div>

<div class="third">
    <section>1</section>
    <div>2</div>
    <div>3</div>
</div>

<div class="forth">
    <div>是</div>
</div>

</body>
</html>